<?php

namespace App\Models;

use Laravel\Sanctum\PersonalAccessToken as SanctumPersonalAccessToken;
use DateTimeInterface;

/**
 * App\Models\UserTokenModel
 */
class UserTokenModel extends SanctumPersonalAccessToken
{
  public $table = 'user_token';
  protected $primaryKey = 'userTokenId';

  // 转换时间格式
  protected function serializeDate(DateTimeInterface $dateTime): string
  {
    return $dateTime->format('Y-m-d H:i:s');
  }

}
